﻿<UserControl
    x:Class="GComp.Apps.EasyStock.Controls.OverviewItem"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:GComp.Apps.EasyStock.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="157"
    d:DesignWidth="194">

    <Viewbox>
        <Border Width="Auto" Height="Auto">
            <Grid Background="{Binding Path=Quote.Change, Converter={StaticResource backgroundConverter}}" >
                <!--<Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>-->
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>

                <TextBlock HorizontalAlignment="Center" Grid.Row="0" Text="{Binding Path=Quote.Symbol}" FontWeight="Bold" />
                <TextBlock HorizontalAlignment="Center" Grid.Row="1" Text="{Binding Path=Quote.Name}" />
                <TextBlock HorizontalAlignment="Center" Grid.Row="2" Text="{Binding Path=Quote.LastPrice}" />
                <TextBlock HorizontalAlignment="Center" Grid.Row="3" Grid.ColumnSpan="2" Text="{Binding Path=Quote.ChangeString}" />
            </Grid>
        </Border>
    </Viewbox>
</UserControl>
